﻿var x = "#fEffect/CharacterEff/1112949/0/0#";//高音譜記號 
var kk = "#fEffect/BasicEff/MainNotice/Boss/Default/0#";//BOSS 
var c = "#fEffect/CharacterEff/1032063/0/0#";//"#fUI/UIMiniGame/starPlanetRPS/heart#";//愛心 
var cmark = "#fUI/UIPVP/ChampionMark/1#";//愛心 
var lb = "#fEffect/CharacterEff/1003393/0/0#";//藍色小光 
var b = "#fEffect/CharacterEff/Shaman/1#";//超萌熊熊 
var cat = "#fEffect/CharacterEff/Shaman/4#";//超萌喵咪 
var tt = "#fUI/Gateway.img/WorldSelect/icon/1#";//香菇 
var t2 = "#fMob/9300882/move/0#";//藍色小光 
var t1 = "#fMob/9300881/move/0#";//藍色小光 
var t3 = "#fMob/9300752/move/0#";//藍色小光 
var t4 = "#fMob/9300756/move/0#";//藍色小光 
var t5 = "#fMob/9300757/move/0#";//藍色小光 
var t6 = "#fNpc/0000001/image/0#";//藍色小光 
var sele;
var b1 = "#fNpc/0000001/image/1#";//角色相關
var b2 = "#fNpc/0000001/image/2#";//裝備強化
var b3 = "#fNpc/0000001/image/3#";//百貨公司 
 var b4 = "#fNpc/0000001/image/4#";//贊助專區
 var b5 = "#fNpc/0000001/image/5#";//地圖傳送
var b6 = "#fNpc/0000001/image/6#";//休閒娛樂
var b7 = "#fNpc/0000001/image/7#";//休閒娛樂
var b8 = "#fNpc/0000001/image/8#";//休閒娛樂
var b9 = "#fNpc/0000001/image/9#";//休閒娛樂
var b10 = "#fNpc/0000001/image2/21#";//休閒娛樂
var b11 = "#fNpc/0000001/image2/22#";//休閒娛樂
var b12 = "#fNpc/0000001/image2/23#";//休閒娛樂
var b13 = "#fNpc/0000001/image2/24#";//休閒娛樂

var z1 = "#i4000110#";//藍色小光 
var z2 = "#i2049900#";//藍色小光 
var z3 = "#i2028174#";//藍色小光 
var z4 = "#i1143024#";//藍色小光 
var z5 = "#i5041001#";//藍色小光 
var z6 = "#i5060016#";//藍色小光 
var status; 
 
var menuList = Array( 
   Array( b1, "", 0, true), //角色相關
    Array( b2, "", 1, true), //裝備強化
    Array(b3, "\r\n", 2, true), //百貨公司
    Array(b4, "", 3, true), //贊助專區
    Array(b5, "", 4, true), //地圖傳送
    Array(b6, "\r\n", 6, true) ,//休閒娛樂
    Array(b7, "", 7, true) ,//新手專區
    Array(b8, "", 500, true) ,//任務活動
    Array(b9, "\r\n", 5, true) //其他功能
    ); 
function start() { 
    status = -1; 
    action(1, 0, 0); 
} 
 
function action(mode, type, selection) { 
 
    if (mode == 0) { 
  cm.dispose(); 
  return; 
    } else if (mode == 1){ 
  status++;  
    } else { 
  status--; 
    } 
 
    switch (status) { 
        case 0:  
                         
      text = "\r\n"+t2+t6+t5+"\r\n\r\n"; 
        if(cm.getPlayer().getGMLevel() >= 4)
			text += "\t\t\t\t\t#L501##b#eGM專區#k#n#l\r\n\r\n"
      var ccc = 0; 
      for (var i = 0; i < menuList.length; i++) { 
        if (menuList[i][3]) { // 如果允许显示 
          text += "#b#L" + menuList[i][2] + "#" + menuList[i][0] + menuList[i][1] + "#l"; 
          ccc++; 
        } 
        if(ccc%3 == 0 && ccc != 0) 
          text +="\r\n"; 
      } 
                      
      text += "\r\n\r\n     #L1000#"+ b12 + "#l     #L1001#" + b13 + "#l\r\n"; 
 
      text += "\r\n\r\n" +c+c+c+c+c+c+c; 
      cm.sendSimple(text); 

            break; 
        case 1: // 
			sele = selection;
			switch (selection){ 
				case 0://角色相關 
				  cm.dispose(); 
				  cm.openNpc(9310111,0); 
				  break; 
				case 1://裝備強化 
				  cm.dispose(); 
				  cm.openNpc(9310111,1); 
				  break; 
				case 2://百貨公司 
				  cm.dispose(); 
				  cm.openNpc(9310111,2); 
				  break; 
				case 3://贊助專區 
				  cm.dispose(); 
				  cm.openNpc(9310111,3); 
				  break; 
				case 4://地圖傳送 
				  cm.dispose(); 
				  cm.openNpc(9310111,4); 
				  break; 
				case 5://更多功能 
				  cm.dispose(); 
				  cm.openNpc(9310111,5); 
				  break; 
				case 6://休閒娛樂
					cm.dispose();
					cm.openNpc(9201116,"Tele_fun");
					break;
				case 7://獎勵專區 
					cm.dispose(); 
					cm.openNpc(9310111,7);
				  break; 
				case 1000://進入商城 
				  cm.dispose(); 
				  cm.enterCS(); 
				  break; 
				case 1001://贊助網址
					text = "#h #您好，有什麼能為您服務的嗎?#b\r\n\r\n#L0#我要贊助#l\r\n#L1#我已繳費要領取贊助點#l"
					cm.sendSimple(text);
				  break; 
				case 500://新手專區 
		 
				  cm.dispose(); 
				  cm.openNpc(9105005); 
				  break; 
				case 501://獎勵專區 
				  cm.dispose(); 
				  cm.openNpc(9310111,"Prize"); 
				  break; 
				default: 
				  cm.sendOk("正在籌備中!敬請期待。"); 
				  cm.dispose(); 
				  break; 
			  } 
			  break; 
		 case 2:
			if(sele == 1001){
				if(selection == 0){
					cm.dispose();
					cm.openNpc(9310111,"getDonatePage");
				}else{
					cm.dispose();
					cm.openNpc(9310111,"getDonate");
				}
			}
			break;
        default: 
      cm.sendOk("發生錯誤，請聯繫管理員!"); 
      cm.dispose(); 
      break; 
    } 
} 